class <%= migration_class_name %> < ActiveRecord::Migration
  def self.up
<% attachment_names.each do |attachment| -%>
    add_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_file_name, :string
    add_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_content_type, :string
    add_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_file_size, :integer
    add_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_updated_at, :datetime
<% end -%>
  end

  def self.down
<% attachment_names.each do |attachment| -%>
    remove_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_file_name
    remove_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_content_type
    remove_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_file_size
    remove_column :<%= name.underscore.camelize.tableize %>, :<%= attachment %>_updated_at
<% end -%>
  end
end
